


def outer(func):
    def inner():
        print("我睡觉了")
        func()
        print("我起床了")
    return inner

@outer
def sleep():
    import random
    import time
    r_int = random.randint(1, 5)
    i = 0
    while(i<r_int):
        i+=1
        print(f"睡眠中 {i} / {r_int}")
        time.sleep(1)

sleep()

print(type(sleep))